#include "llt_highFilter.hh"

using namespace userPPF;

void
highFilter::processData(lee::PktData * const pkt)
{
  assert(pkt != NULL);
  tt::Packet * packet = static_cast<tt::Packet *>(pkt);
  const tt::FiveTuple & ft = packet->getFiveTuple();
  if(ft.dport == 80) {
    normal(pkt);
  }
  else if(ft.dport > 1000) {
    fast(pkt);
  }
  else {
    drop(pkt);
  }
  return;
}

void
highFilter::handler(lee::Event * ev)
{
  std::cout << "Got event " << ev->getType() << "!" << std::endl;
  return;
}  
